## Docker 镜像构建
#FROM maven:3.5-jdk-8-alpine as builder
##FROM maven:3.8.1-openjdk-17-armv7 as builder
#FROM maven:3.8.1-openjdk-17-slim AS builder
#
## Copy local code to the container image.
#WORKDIR /app
#COPY pom.xml .
#COPY src ./src
#
## Build a release artifact.
#RUN mvn package -DskipTests
#
## Run the web service on container startup.
#CMD ["java","-jar","/app/target/microNews-1.0-SNAPSHOT.jar","--spring.profiles.active=prod"]

FROM openjdk:17-jdk-slim
ARG JAR_FILE=target/microNews-1.0-SNAPSHOT.jar
COPY ${JAR_FILE} app_microNews.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app_microNews.jar"]